package com.mybatis.code.gen.controller;

import com.mybatis.code.gen.api.CodeDbConfig;
import com.mybatis.code.gen.util.CodeGenUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: liuby5
 * @CreateTime: 2023-05-16  16:58
 * @Description:
 * @Version: 1.0
 */
@RestController
@RequestMapping("/mybatis/code")
public class CodeGenController {

    @PostMapping("/gen")
    public void codeGen(@RequestBody CodeDbConfig config){
        CodeGenUtils.codeGen(config);
    }
}
